window.onload = function (ev) {
    layui.use(['jquery','layer'],function () {
    var $ = layui.jquery;
        var layer = layui.layer;
    $('#qued').on('click',function () {
            //表单序列化
            var phone=$('#phone').val();
            if(phone==""){
                Utils.layer.msg("请输入联系方式");
                flag=false;
            }else {
                $.ajax({
                    'type':'POST',
                    'url':'/content/contact',
                    'dataType':'json',
                    'async': false,
                    'data':{'phone':phone},
                    success: function (data) {
                        //    alert("Data Saved:111 " );
                       if(data.code==0) {
                            Utils.layer.msg(data.data)
                           setTimeout(function () {
                               location.href="/content/contact"
                           },1000)
                        }
                    },
                    error: function () {
                        alert("设置失败，请重新添加 ");
                    },
                });
            }
        })
})
}


